package com.ruoyi.business.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.AppCustomerBillMapper;
import com.ruoyi.business.domain.AppCustomerBill;
import com.ruoyi.business.service.IAppCustomerBillService;

/**
 * 客户账单Service业务层处理
 * 
 * @author CuiYingJie
 * @date 2020-12-01
 */
@Service
public class AppCustomerBillServiceImpl implements IAppCustomerBillService 
{
    @Autowired
    private AppCustomerBillMapper appCustomerBillMapper;

    /**
     * 查询客户账单
     * 
     * @param id 客户账单ID
     * @return 客户账单
     */
    @Override
    public AppCustomerBill selectAppCustomerBillById(Integer id)
    {
        return appCustomerBillMapper.selectAppCustomerBillById(id);
    }

    /**
     * 查询客户账单列表
     * 
     * @param appCustomerBill 客户账单
     * @return 客户账单
     */
    @Override
    public List<AppCustomerBill> selectAppCustomerBillList(AppCustomerBill appCustomerBill)
    {
        return appCustomerBillMapper.selectAppCustomerBillList(appCustomerBill);
    }

    /**
     * 新增客户账单
     * 
     * @param appCustomerBill 客户账单
     * @return 结果
     */
    @Override
    public int insertAppCustomerBill(AppCustomerBill appCustomerBill)
    {
        appCustomerBill.setCreateTime(DateUtils.getNowDate());
        return appCustomerBillMapper.insertAppCustomerBill(appCustomerBill);
    }

    /**
     * 修改客户账单
     * 
     * @param appCustomerBill 客户账单
     * @return 结果
     */
    @Override
    public int updateAppCustomerBill(AppCustomerBill appCustomerBill)
    {
        appCustomerBill.setUpdateTime(DateUtils.getNowDate());
        return appCustomerBillMapper.updateAppCustomerBill(appCustomerBill);
    }

    /**
     * 批量删除客户账单
     * 
     * @param ids 需要删除的客户账单ID
     * @return 结果
     */
    @Override
    public int deleteAppCustomerBillByIds(Integer[] ids)
    {
        return appCustomerBillMapper.deleteAppCustomerBillByIds(ids);
    }

    /**
     * 删除客户账单信息
     * 
     * @param id 客户账单ID
     * @return 结果
     */
    @Override
    public int deleteAppCustomerBillById(Integer id)
    {
        return appCustomerBillMapper.deleteAppCustomerBillById(id);
    }
}
